<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib uri="/struts-tags" prefix="s"%>    
<%@taglib uri="/struts-jquery-tags" prefix="sj" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
	<link href="/passeport-animalier/css/main.css" rel="stylesheet" type="text/css"/>
	<script type="text/javascript">
		function change(id){
			   var selectElmt = document.getElementById("select"+id);
			   var span = document.getElementById("span"+id);
			   var textselectionne = selectElmt.options[selectElmt.selectedIndex].text;
			   span.innerHTML=textselectionne;
					
		}
	</script>
</head>
<body>
	<div class="content" style="padding-bottom: 0px;">
			<s:if test="hasActionErrors()">
 			<div class="nNote nFailure">
				<p id="actionError">
				</p>
			</div> 
 			</s:if>
			<div class="widget first" >
				<div class="head">
				     <h5 class="iList"> <s:text name="form.modification"/> </h5>
			    </div>
			    <div class="body">
			       <div class="widget first" style="margin-top: 0px;" >
			    	<s:form action="v_modifier_fermier" namespace="admin" cssClass="mainForm" method="post" theme="simple" id="form_fermier"  >
			    			<input type="hidden" value="${fermier.id}" name="fermier.id"/>
			    			<div class="rowElem">
								<label> <s:text name="presonne.nom"/> </label>
								<div class="formRight" style="margin: 3px;">
								<input type="text" value="${fermier.nom}" name="fermier.nom" id="fermier.nom">
								<span class="field_error" id="span_fermier.nom"> <s:property value="errors['fermier.nom']"/> </span>
								</div>
								<div class="fix"></div>
							</div>
			    			<div class="rowElem" >
								<label> <s:text name="presonne.prenom"/> </label>
								<div class="formRight" style="margin: 3px;">
								<input type="text" value="${fermier.prenom}" name="fermier.prenom" id="fermier.prenom">
								<span class="field_error" id="span_fermier.prenom"> <s:property value="errors['fermier.prenom']"/> </span>
								</div>
								<div class="fix"></div>
							</div>
							<div class="rowElem">
								<label> <s:text name="presonne.dateNaissance"/> </label>
								<div class="formRight">
								<sj:datepicker id="date0" displayFormat="dd/mm/yy" name="fermier.dateNaissance" buttonImage="/passeport-animalier/images/icons/color/calendar-day-10.png">
								</sj:datepicker>
								<span class="field_error" id="span_fermier.dateNaissance"> <s:property value="errors['fermier.dateNaissance']"/> </span>
								</div>
								<div class="fix"></div>
							</div>
							<div class="rowElem">
								<label> <s:text name="presonne.telephone"/> </label>
								<div class="formRight" style="margin: 3px;">
								<input type="text" value="${fermier.telephone}" name="fermier.telephone">
								<span class="field_error" id="span_fermier.telephone"> <s:property value="errors['fermier.telephone']"/> </span>
								</div>
								<div class="fix"></div>
							</div>
							<div class="rowElem">
								<label> <s:text name="presonne.email"/> </label>
								<div class="formRight" style="margin: 3px;">
								<input type="text" value="${fermier.compte.email}" name="fermier.compte.email">
								<span class="field_error" id="span_fermier.compte.email"> <s:property value="errors['fermier.compte.email']"/> </span>
								</div>
								<div class="fix"></div>
							</div>
							<div class="rowElem">
								<label> <s:text name="fermier.salaire"/> </label>
								<div class="formRight" style="margin: 3px;">
								<input type="text" value="${fermier.salaire}" name="fermier.salaire">
								<span class="field_error" id="span_fermier.salire"> <s:property value="errors['fermier.salire']"/> </span>
								</div>
								<div class="fix"></div>
							</div>
							<div class="rowElem">
								<label> <s:text name="fermier.dateRecrutement"/> </label>
								<div class="formRight">
								<sj:datepicker id="date1" label="Select a Date" displayFormat="dd/mm/yy" name="fermier.dateRecrutement" cssStyle="width:80%;margin-right:4px;" buttonImage="/passeport-animalier/images/icons/color/calendar-day-10.png"  />
								<span class="field_error" id="span_fermier.dateRecrutement"> <s:property value="errors['fermier.dateRecrutement']"/> </span>
								</div>
								<div class="fix"></div>
							</div>
							<div class="rowElem">
								<label><s:text name="betail.type"/> </label>
								<div class="formRight">
									<div class="selector" id="uniform-undefined">
										<span style="-moz-user-select: none;" id="span${fermier.id}"> <s:property value="%{fermier.typeBetail.type}"/> </span>
										<s:select list="typesBetail" name="typeBetail" cssStyle="opacity:0;" id="select%{fermier.id}" onclick="change(%{fermier.id});"/>
									</div>
								</div>
							</div>
							<div class="fix"></div>
			    	</s:form>
			    </div>
			   </div> 
		    </div>
	    </div>
</body>
</html>